<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自动化测试平台</title>
</head>
<body role="document">
<!--导航栏-->
    <nav class="navbar navbar-inverse navbar-fixed-top">

      <div class="container">
          <div class="navbar-header">
              <a class="navbar-brand" href="#">自动化测试平台</a>
          </div>
          <div id="navbar" class="collapse navbar-collapse">
              <ul class="nav navbar-nav">
                  <li><a href="/apis_manage/">单一接口测试</a> </li>
              </ul>
              <ul class="nav navbar-nav navbar-right">
                  <li><a href="#">{{ user }}</a></li>
                  <li><a href="/logout/">退出</a></li>
              </ul>
          </div>
      </div>
    </nav>
<!--流程接口测试步骤-->
    <div class="row" style="padding-top: 55px;">
        <div class="col-md-11">
            <table class="table table-striped">
                <div style="position:absolute; right:10px; width:10px;">
                <tr><th></th><th></th><th></th><th></th><th></th><th>单一接口扫描-自动化测试汇总报告</th></tr>
                <tr><th>用例总数</th>
                <td>{{ apiscounts }}</td><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th>
                </tr>
                <tr><th>通过</th><td>{{ apis_pass_counts}}</td><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th></tr>
                <tr><th>不通过</th><td><a style="color:red"> {{ apis_fail_counts}}</a></td><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th><tr><th></tr>
            </div>
            </table>
    <!--单一接口测试用例-->
           <table class="table table-striped">
            <thead>
            <tr><th>失败接口列表</th></tr>
               <tr>
                <th>ID</th><th>产品</th><th>测试用例名称</th><th>URL地址</th><th>参数=值</th><th>方法</th><th>预期结果</th><th>测试结果</th><th>执行时间</th>
               </tr>
            </thead>
            <tbody>
                {% for apis in apises %}
                <tr>
                    <td>{{ apis.id }}</td>
                    <td>{{ apis.Product.productname }}</td>
                    <td>{{ apis.apiname }}</td>
                    <td>{{ apis.apiurl }}</td>
                    <td>{{ apis.apiparamvalue }}</td>
                    <td>{{ apis.apimethod }}</td>
                    <td>{{ apis.apiresult }}</td>
                    <td>    {% if apistep.apistatus == 1 %}
                        <a style="color:green">{{ apistep.apistatus }}</a>
                    {% else %}
                        <a style="color:red">{{ apistep.apistatus }}</a>
                    {% endif %}
                    </td>
                    <td>{{ apis.created_time }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </div>
    </div>
</body>
</html>